/*
 * MediadorAltaPais.java
 *
 * Created on 7 de marzo de 2007, 19:23
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package cliente.mediador;

import cliente.ClienteConection;
import cliente.Funciones;
import cliente.gui.*;
import comun.dto.*;
import comun.iControl.*;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.StringTokenizer;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class MediadorABMLibroIva implements ActionListener {
    private GuiABMLibroIva guiABMLibroIva = null;
    public IControlLibroIva controlLibroIva;

    public MediadorABMLibroIva() throws Exception {
        ClienteConection clienteConexion = new ClienteConection();
        try{
           clienteConexion.iniciar();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        this.controlLibroIva=clienteConexion.getIControlLibroIva();
        guiABMLibroIva = new GuiABMLibroIva();
        guiABMLibroIva.setActionListeners(this);
        show();
    }
    
    
   
    private void show() {  	    	
        guiABMLibroIva.show();
    }

    public void actionPerformed(ActionEvent e) {
        Object source = e.getSource();
        if (source==guiABMLibroIva.getJBAlta()){
        	try {
				MediadorAltaLibroIva medALI = new MediadorAltaLibroIva();
			} catch (Exception e1) {}
        }
        else if (source== guiABMLibroIva.getJBAgregarComprobantes()){
        	try {
				MediadorAgregarComprobantes medAC = new MediadorAgregarComprobantes();
			} catch (Exception e1) {}
        }
        else if (source==guiABMLibroIva.getJBSalir()){
        	guiABMLibroIva.dispose();
        }
        
    }

}
